<script type="text/javascript" >
    stTwitterToolbox.sortColumn();
    stTwitterToolbox.shortAction();
        jQuery(document).ready(function() {
        jQuery(".galleryVideo a[rel^='prettyPhoto']").prettyPhoto({
            theme:'facebook',
            keyboard_shortcuts: false
        });
</script>
<div id="fb-root"></div>
<div class="w100p bgl" id="stcontainer">
    <div class="w100p bgr">
        <div class="inner_container">
            <input type="hidden" id="picture" value="<?php echo $plugin_url;?>images/mini-loading.gif" />
            <input type="hidden" id="base_url" value="<?php echo admin_url('/admin.php?page=' . $config['plugin_name'] . '&action=') ?>" />
            <p align="center" id="update_twitter" align="center"></p>
            <table class="widefat galleryVideo" cellspacing="0" >
                <thead>
                    <tr>
                        <?php print_column_headers('stFacebookToolbox_stFacebookToolbox'); ?>
                    </tr>
                </thead>

                <tbody>
                <?php
                if (count($results) > 0) {
                    
                    $tr_class = "";
                    $upload_data = wp_upload_dir();
                    foreach ($results as $result) {
                        if( empty($tr_class) || $tr_class == "class='bg_gray2'"){
                            $tr_class = "class='bg_gray1'";
                        }else{
                            $tr_class = "class='bg_gray2'";
                        }
                        echo "<tr id='$result->id' $tr_class >"
                        . "<td>" . $result->id_str
                        . "<div class=\"row-actions short_action\">";
                        if($model->get_number($result->id_str) > 0)
                        echo "<span action='' short_action='' id='".$result->id."' onclick='jQuery.prettyPhoto.loadPage(\"sub_twitter_list&id={$row->id_str}\", null,location.href.split(\"?\")[0]+\"?page=stTwitterToolbox\")' style='cursor:pointer;'>View reply ({$model->get_number($result->id_str)})</span>";
                        echo "</div>"
                        . "</td>"
                        . "<td>" . $result->text . "</td>"
                        . "<td>";
                        echo $result->username ;
                        echo "</td>"
                        . "<td>" . substr($result->date,0,-10) . "</td>"
                        . "</tr>"
                        ;
                    }
                }
                ?>
                </tbody>
            </table>
            <div class="page_d">
                <?php echo $pagination?>
                <div class="cl"></div>
            </div>

        </div>
    </div>
</div>